package com.neouton.crm.cm.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.neouton.crm.cm.entity.SalesCostMigrateBackVO;
import com.neouton.crm.cm.entity.SalesCostMigrateVO;
import com.neouton.crm.entity.SysUserEntity;
import com.neouton.crm.pm.entity.SalesProjectManageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 巾凡
* @description 针对表【sales_cost_migrate(费用迁移表)】的数据库操作Mapper
* @createDate 2023-01-11 17:06:16
* @Entity com.neouton.crm.cm.entity.SalesCostMigrate
*/
@Mapper
public interface SalesCostMigrateMapper {

    IPage<SalesCostMigrateVO> queryCostInfo(@Param("page") IPage page, @Param("costMigrateVO") SalesCostMigrateVO costMigrateVO, @Param("userList") List<SysUserEntity> userList);

    IPage<SalesCostMigrateVO> queryCostInfoAudit(@Param("page") IPage page, @Param("costMigrateVO") SalesCostMigrateVO costMigrateVO);

    List<SalesCostMigrateVO> queryCostInfo(@Param("costMigrateVO") SalesCostMigrateVO costMigrateVO, @Param("userList") List<SysUserEntity> userList);

    IPage<SalesCostMigrateVO> queryCostById(@Param("page") IPage page, @Param("costMigrateVO") SalesCostMigrateVO costMigrateVO);

    List<SalesCostMigrateVO> queryCostById(@Param("costMigrateVO") SalesCostMigrateVO costMigrateVO);

    List<SalesCostMigrateVO> queryCostByPM(@Param("list") List<Integer> list);

    SalesCostMigrateVO queryCostApprovalByWorkId(@Param("workId")Integer workId);

    SalesCostMigrateVO queryHistoryCostRecordByApprovalId(@Param("workId")Integer workId);

    int updateCostOfProject(@Param("costMigrateVO") SalesCostMigrateVO costMigrateVO);

    int logicDelete(Integer costMigrateId);

    int deleteByPrimaryKey(Long id);

    int insert(SalesCostMigrateVO record);

    int insertSelective(SalesCostMigrateVO record);

    SalesCostMigrateVO selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SalesCostMigrateVO record);

    int updateByPrimaryKey(SalesCostMigrateVO record);

}
